package com.marce.remis.flexClient.commands
{
	import com.marce.remis.flexClient.control.Delegator;
	import com.marce.remis.flexClient.events.AbstractEvent;
	import com.marce.remis.flexClient.events.FindRemisesEvent;
	import com.marce.remis.flexClient.model.ModelLocator;
	import com.marce.remis.flexClient.vo.Role;
	
	import mx.collections.ArrayCollection;

	public class FindRemisesCommand extends AbstractCommand
	{
		private var role:Role;
		override public function executeCommand(event:AbstractEvent):void
		{
			Delegator.getInstance().findRemisesToday(this);
		}
		
		override public function onResult(data:Object):void
		{
			var remises:ArrayCollection = data as ArrayCollection;
			ModelLocator.instance.remisesModel.remises = remises;
		}
		
	}
}